﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class admin_comparttimework : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {

        string strmax = get.getmaxcomwebjianzhiid();
        if (strmax == "")
        {
            strmax = "com10000";
        }
        int max = Convert.ToInt32(strmax.Substring(3)) + 1;
        strmax = strmax.Substring(0, 3) + max;
        get.insertcomwebjianzhi(strmax, comname.Text, comtel.Text, linkman.Text, persontype.Text, Convert.ToInt32(personnum.Text), DateTime.Now.ToShortDateString(), txttime.Text, txtemail.Text);
        Label1.Text = "<script>alert('申请成功!');window.location.href='ComDefault.aspx';</script>";

    }
}
